

import 'package:trade/common/network/base/base_http.dart';
import 'package:trade/common/service/i_service.dart';
import 'package:trade/common/service/image_service/image_service.dart';
import 'package:trade/common/service/router_service/router_service.dart';
import 'package:trade/common/service/svg_service/svg_service.dart';

import 'cache_service/cache_service.dart';

final TDService service = TDService();
class TDService extends IService {

  factory TDService() => _getInstance()!;
  static TDService? get instance => _getInstance();
  static TDService? _instance;
  TDService._internal();
  static TDService? _getInstance() {
    if(null == _instance){
      _instance = TDService._internal();
    }
    return _instance;
  }


  @override
  Future<void> init() async {
    await router.init();
    await cache.init();
    await image.init();
    await svg.init();

  }

  final router = RouterService();
  final cache = CacheService();
  final image = ImageService();
  final svg = SvgService();
}